package com.wyl.template.config.shiro;

import org.apache.shiro.session.Session;
import org.apache.shiro.session.mgt.eis.SessionIdGenerator;

import java.io.Serializable;
import java.util.UUID;

/**
 * @Auther: wyl
 * @Date: 2021/4/29
 * @Description: 自定义sesionid生成
 */
public class CustomSessionIdGenerator implements SessionIdGenerator {

    @Override
    public Serializable generateId(Session session) {

        return "wyl_" + UUID.randomUUID().toString().replace("-", "");

    }
}
